
<div style="POSITION: relative" id="content">
  <h3>easyUI 自定义window工具</h3>
  <div id="article_content" class="article_content">
    <p>默认的window有四个工具:<span style="font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif; font-size:14px; text-align:left">collapsible,minimizable,maximizable 和closable.如示例我们定义以下window</span></p>
    <p><span style="font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif; font-size:14px; text-align:left"></span>
    <pre name="code" class="html">&lt;div id=&quot;win&quot; class=&quot;easyui-window&quot; title=&quot;My Window&quot; style=&quot;padding:10px;width:200px;height:100px;&quot;&gt;  
    window content  
&lt;/div&gt;  </pre>
    <img src="documentation/images/1344673919_2289.png" alt=""><br>
    自定义工具,设置该工具为true或者false,如示例我们希望定义一个window仅仅拥有一个可关闭的工具,你应该设置任何其他工具为false,我们定义工具属性在标记或者通过jQuery代码,现在我们使用jQuery代码定义window:
    </p>
    <p><span style="font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif; font-size:14px; text-align:left"></span>
    <pre name="code" class="javascript">$('#win').window({  
    collapsible:false,  
    minimizable:false,  
    maximizable:false  
});  </pre>
    </p>
    <p><span style="font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif; font-size:14px; text-align:left"><img src="documentation/images/1344674264_9308.png" alt=""><br>
      </span></p>
    <p>如果我们希望添加自己定义的工具按钮到window,我们可以使用<span style="font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif; font-size:14px; text-align:left">tools 属性,作为示例我们添加我们的两个工具到window.</span></p>
    <p><span style="font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif; font-size:14px; text-align:left"></span>
    <pre name="code" class="javascript">$('#win').window({  
    collapsible:false,  
    minimizable:false,  
    maximizable:false,  
    tools:[{  
        iconCls:'icon-add',  
        handler:function(){  
            alert('add');  
        }  
    },{  
        iconCls:'icon-remove',  
        handler:function(){  
            alert('remove');  
        }  
    }]  
});  </pre>
    </p>
    <p><span style="font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif; font-size:14px; text-align:left"><img src="documentation/images/1344674390_5863.png" alt=""><br>
      </span></p>
    <br>
    <h4 style="font-size:16px; color:rgb(204,0,0); margin:10px 0px; font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif; text-align:left"> 下载EasyUI示例代码:</h4>
    <div style="font-size:14px; font-family:Arial,Helvetica,'Nimbus Sans L',sans-serif; text-align:left; padding-left:50px"> <a href="http://jquery-easyui.googlecode.com/svn/trunk/share/tutorial/window/easyui-window-demo2.zip" target="_blank" class="download-link" style="color:rgb(0,0,255)">easyui-window-demo.zip</a></div>
    <br>
  </div>
</div>
<SCRIPT type=text/javascript>
	dp.SyntaxHighlighter.ClipboardSwf = 'documentation/js/clipboard.swf'/*tpa=http://jeasyui.com/SyntaxHighlighter/Scripts/clipboard.swf*/;
	dp.SyntaxHighlighter.HighlightAll('code');
</SCRIPT>